package com.example.demo.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.jfinal.qyweixin.sdk.api.ApiResult;

@RestController
@RequestMapping("/client")
public class ClientApiController {

	@Autowired
	ThirdServerApi thirdApi;

	@RequestMapping("/user")
	public String user() {

		String userid = "gwx-client";
		ApiResult userInfo = thirdApi.getUserInfo(userid);
		System.out.println(userInfo);
		return userInfo.getJson();
	}
}
